<template>
  <el-dialog
    :visible.sync="dialogVisible"
    :title="`${type === 'Add' ? '新增' : '编辑'}角色`"
    width="600px"
    custom-class="dialog"
  >
    <el-form label-width="80px">
      <el-form-item label="角色名称">
        <el-input />
      </el-form-item>
      <el-form-item label="备注">
        <el-input type="textarea" :rows="6" />
      </el-form-item>
    </el-form>
    <span slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false" size="small">取 消</el-button>
      <el-button type="primary" @click="dialogVisible = false" size="small"
        >确 定
      </el-button>
    </span>
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      type: "Add",
      currentRow: null,
      dialogVisible: false,
    };
  },
  methods: {
    openHandle(type, row) {
      this.type = type;
      this.currentRow = { ...row };
      this.dialogVisible = true;
    },
    handleClose() {
      this.dialogVisible = false;
    },
  },
};
</script>

<style lang="scss" scoped></style>
